package com.multi.thread.chapter03.demo05;

public class Run {
	
	//调用方法notify()一次只随机通知一个线程进行唤醒
	public static void main(String[] args) throws InterruptedException {
		Object lock = new Object();
		
		ThreadA a = new ThreadA(lock);
		a.start();
		
		ThreadA b = new ThreadA(lock);
		b.start();
		
		ThreadA c = new ThreadA(lock);
		c.start();
		
		Thread.sleep(1000);
		
		NotifyThread thread = new NotifyThread(lock);
		thread.start();
	}

}
